import 'package:flutterproject/generated/json/base/json_convert_content.dart';
import 'package:flutterproject/page/product_detail/data/product_detail_bean.dart';

ProductDetailBean $ProductDetailBeanFromJson(Map<String, dynamic> json) {
	final ProductDetailBean productDetailBean = ProductDetailBean();
	final String? description = jsonConvert.convert<String>(json['description']);
	if (description != null) {
		productDetailBean.description = description;
	}
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		productDetailBean.id = id;
	}
	final String? mainImage = jsonConvert.convert<String>(json['mainImage']);
	if (mainImage != null) {
		productDetailBean.mainImage = mainImage;
	}
	final int? price = jsonConvert.convert<int>(json['price']);
	if (price != null) {
		productDetailBean.price = price;
	}
	final int? stock = jsonConvert.convert<int>(json['stock']);
	if (stock != null) {
		productDetailBean.stock = stock;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		productDetailBean.title = title;
	}
	return productDetailBean;
}

Map<String, dynamic> $ProductDetailBeanToJson(ProductDetailBean entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['description'] = entity.description;
	data['id'] = entity.id;
	data['mainImage'] = entity.mainImage;
	data['price'] = entity.price;
	data['stock'] = entity.stock;
	data['title'] = entity.title;
	return data;
}